class SoundAnalyzer {
  constructor() {
    this.thresholds = {
      scream: 80, // 尖叫声分贝阈值
      fight: 75,  // 打斗声分贝阈值
      help: 70    // 求救声分贝阈值
    };
  }

  analyzeSoundType(decibel, frequency) {
  
    if (decibel > this.thresholds.scream) {
      return 'scream';
    } else if (decibel > this.thresholds.fight) {
      return 'fight';
    } else if (decibel > this.thresholds.help) {
      return 'help';
    }
    return 'normal';
  }

  isEmergency(soundType, decibel) {
    // 紧急情况判断逻辑
    return soundType !== 'normal' && decibel > this.thresholds[soundType];
  }
} 